package com.cloudkinto.service.order.vo.amazon.vdfOrder;

import com.baomidou.mybatisplus.core.enums.IEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单状态
 *
 * @author loong
 */

public enum OrderStatus implements IEnum<String> {
    /**
     * 新建
     */
    NEW("新建"),
    /**
     * 已发货
     */
    SHIPPED("已发货"),
    /**
     * 已受理
     */
    ACCEPTED("已受理"),
    /**
     * 已取消
     */
    CANCELLED("已取消");

    private final String desc;

    OrderStatus(String desc) {
        this.desc = desc;
    }

    public static Map<String, String> getOrderStatusMap() {
        HashMap<String, String> map = new HashMap<>();
        for (OrderStatus orderStatus : values()) {
            map.put(orderStatus.name(), orderStatus.getDesc());
        }
        return map;
    }

    @Override
    public String getValue() {
        return name();
    }

    public String getDesc() {
        return desc;
    }
}
